<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Compiling and building</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="wincache.win32build.prereq.html">« Prerequisites</a></li>
      <li style="float: right;"><a href="wincache.win32build.verify.html">Verifying the build »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="wincache.win32build.html">Building for Windows</a></li>
    <li>Compiling and building</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="wincache.win32build.building" class="section">
   <h2 class="title">Compiling and building</h2>
   <p class="para">
    The following steps describe how to compile and build WinCache on Windows OS:
   </p>
   <div class="procedure">
    <ol type="1"><li>
     <p class="simpara">Open a command prompt which is used to build PHP</p>
    </li>
    <li>
     <p class="simpara">Go to the root folder where PHP sources are present</p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">cscript.exe win32\build\buildconf.js</pre>
</div>
      </div>

     </p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">configure.bat --help</pre>
</div>
      </div>

      The output will contain a new flag <code class="literal">--enable-wincache</code>.
     </p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">configure.js [all options used to build PHP] --enable-wincache</pre>
</div>
      </div>

      <code class="literal">--enable-wincache</code> is the only extra option which is 
      required to ensure that WinCache extension gets built properly. 
      This option will build WinCache and will statically link it with PHP dll. 
      To build WinCache extension as a stand-alone DLL use the option 
      <code class="literal">--enable-wincache=shared</code>.
     </p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">nmake</pre>
</div>
      </div>

     </p>
    </li>
   </ol></div>
  </div></div></div></body></html>